package com.fingersoft.feature.scheme;

import android.app.Activity;

import com.fingersoft.feature.login.LoginActivity;
import com.fingersoft.im.utils.AppUtils;

/**
 * Created by liubinbin on 2017/9/9.
 */
public final class SealSchemeContext implements ISchemeContext {

    @Override
    public Boolean isLogined() {
        return AppUtils.isLogged();
    }

    @Override
    public String getUserToken() {
        return AppUtils.getTokenInfo().getUserToken();
    }

    @Override
    public String getUserName() {
        return AppUtils.getUser().getUserName();
    }

    @Override
    public String getUserIcon() {
        return AppUtils.getUser().getEmpLivingPhoto();
    }

    @Override
    public void doLogin(Activity context) {
        LoginActivity.start(context,true);
    }
}
